import request from '@/utils/request';
import { BASE_URL } from '@/config/query';

export async function queryFire() {
  return request(`${BASE_URL}/device_alarm/fire/week/chart`);
}

export async function queryIncidence() {
  return request(`${BASE_URL}/device_alarm/month/page`)
}

//设备状态报警占比
export async function queryAlarmTotal(params) {
  return request(`${BASE_URL}/device_state/group`, params)
}

//报警时段分布
export async function queryAlarmDistribution(params) {
  return request(`${BASE_URL}/device_state/time/group`, params)
}

//报警趋势
export async function queryAlarmTrend(params) {
  return request(`${BASE_URL}/device_state/time/chart`, params)
}